<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>latinodances <?php echo (isset($page_title))?' :: '.$page_title:''; ?></title>

<link
	href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css"
	rel="stylesheet">

<link type="text/css"
	href="<?php echo base_url('assets/css/jquery-ui.css');?>"
	rel="stylesheet" />
<link type="text/css"
	href="<?php echo base_url('assets/css/redactor.css');?>"
	rel="stylesheet" />
<link type="text/css"
	href="<?php echo base_url('assets/css/file-browser.css');?>"
	rel="stylesheet" />
<link rel="stylesheet"
	href="<?php echo base_url('assets/css/fullcalendar.css');?>" />
<link rel="stylesheet"
	href="<?php echo base_url('assets/css/unicorn.main.css');?>" />
<link rel="stylesheet"
	href="<?php echo base_url('assets/css/unicorn.grey.css');?>"
	class="skin-color" />

<script type="text/javascript"
	src="http://code.jquery.com/jquery-2.0.3.js"></script>
<script type="text/javascript"
	src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script
	src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/jquery.flot.min.js');?>"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/jquery.flot.resize.min.js');?>"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/jquery.peity.min.js');?>"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/jquery.cookie.js');?>"></script>

<script type="text/javascript"
	src="<?php echo base_url('assets/js/redactor.min.js');?>"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/file-browser.js');?>"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/excanvas.min.js');?>"></script>
<script type="text/javascript"
	src="<?php echo base_url('assets/js/fullcalendar.min.js');?>"></script>

<script type="text/javascript"
	src="<?php echo base_url('assets/js/unicorn.js');?>"></script>


<?php if($this->auth->is_logged_in(false, false)):?>
	

<script type="text/javascript">
$(document).ready(function(){
    $('.datepicker').datepicker({dateFormat: 'yy-mm-dd'});
    
    $('.redactor').redactor({
            minHeight: 200,
            imageUpload: '<?php echo site_url(config_item('admin_folder').'/wysiwyg/upload_image');?>',
            fileUpload: '<?php echo site_url(config_item('admin_folder').'/wysiwyg/upload_file');?>',
            imageGetJson: '<?php echo site_url(config_item('admin_folder').'/wysiwyg/get_images');?>',
            imageUploadErrorCallback: function(json)
            {
                alert(json.error);
            },
            fileUploadErrorCallback: function(json)
            {
                alert(json.error);
            }
      });
});
</script>
<?php endif;?>
</head>
<body>
<?php if($this->auth->is_logged_in(false, false)):?>


			<?php $admin_url = site_url($this->config->item('admin_folder')).'/';?>
			
		<div id="header">
		<h1>
			<a href="<?php echo $admin_url;?>"><img width="65"
				src="<?php echo base_url('assets/img/login-logo.png');?>" /> Admin</a>
		</h1>
	</div>
	<!--
		<div id="search">
			<input type="text" placeholder="Search here..." /><button type="submit" class="tip-right" title="Search"><i class="icon-search icon-white"></i></button>
		</div>
		-->
	<div id="user-nav" class="navbar navbar-inverse">
		<ul class="nav btn-group">
			<li class="btn btn-inverse"><a title="" href="#"><i
					class="icon icon-user"></i> <span class="text">Admin</span></a></li>
			<li><a
				href="<?php echo site_url($this->config->item('admin_folder').'/dashboard');?>"><i
					class="icon-cog"></i> <?php echo lang('common_dashboard') ?></a></li>
			<li><a href="<?php echo site_url();?>"><i class="icon-eye-open"></i> <?php echo lang('common_front_end') ?></a></li>
			<li class="btn btn-inverse"><a title="" href="#"><i
					class="icon icon-cog"></i> <span class="text">Settings</span></a></li>
			<li class="btn btn-inverse"><a title=""
				href="<?php echo site_url($this->config->item('admin_folder').'/login/logout');?>"><i
					class="icon-off"></i> <span class="text"><?php echo lang('common_log_out') ?></span></a></li>
		</ul>
	</div>


	<div id="sidebar">
		<a href="#" class="visible-phone"><i class="icon icon-home"></i>
			Dashboard</a>
		<ul>

			<li class="active"><a href="<?php echo $admin_url;?>"><i
					class="icon icon-home"></i> <span>Dashboard</span></a></li>
			<li class="submenu" id="sub1"><a
				href="<?php echo $admin_url;?>orders"><i class="icon icon-list"></i>
					<span><?php echo lang('common_orders') ?></span> <span
					class="label">6</span></a>

				<ul>
					<li><a href="<?php echo $admin_url;?>orders"><?php echo lang('common_orders') ?></a></li>
					<?php if($this->auth->check_access('Admin')) : ?>
							<li><a href="<?php echo $admin_url;?>customers"><?php echo lang('common_customers') ?></a></li>
					<li><a href="<?php echo $admin_url;?>customers/groups"><?php echo lang('common_groups') ?></a></li>
					<li><a href="<?php echo $admin_url;?>reports"><?php echo lang('common_reports') ?></a></li>
					<li><a href="<?php echo $admin_url;?>coupons"><?php echo lang('common_coupons') ?></a></li>
					<li><a href="<?php echo $admin_url;?>giftcards"><?php echo lang('common_giftcards') ?></a></li>
					<?php endif; ?>
					</ul></li>
				
				
					<?php
	// Restrict access to Admins only
	if ($this->auth->check_access ( 'Admin' )) :
		?>
					<li class="submenu" id="sub2"><a href="#"><i
					class="icon icon-shopping-cart"></i> <span><?php echo lang('common_catalog') ?> </span>
					<span class="label">4</span></a>
				<ul>
					<li><a href="<?php echo $admin_url;?>categories"><?php echo lang('common_categories') ?></a></li>
					<li><a href="<?php echo $admin_url;?>products"><?php echo lang('common_products') ?></a></li>
					<li><a href="<?php echo $admin_url;?>digital_products"><?php echo lang('common_digital_products') ?></a></li>
					<li><a href="<?php echo $admin_url;?>newsletter"><?php echo lang('common_newsletter') ?></a></li>
				</ul></li>

			<li class="submenu" id="sub3"><a href="#"><i
					class="icon icon-th-list"></i> <span><?php echo lang('common_content') ?> </span>
					<span class="label">3</span></a>
				<ul>
					<li><a href="<?php echo $admin_url;?>banners"><?php echo lang('common_banners') ?></a></li>
					<li><a href="<?php echo $admin_url;?>boxes"><?php echo lang('common_boxes') ?></a></li>
					<li><a href="<?php echo $admin_url;?>pages"><?php echo lang('common_pages') ?></a></li>
				</ul></li>

			<li class="submenu" id="sub4"><a href="#"><i class="icon icon-inbox"></i>
					<span><?php echo lang('common_administrative') ?></span> <span
					class="label">6</span></a>
				<ul>

					<li><a href="<?php echo $admin_url;?>shipping"><?php echo lang('common_shipping_modules') ?></a></li>
					<li><a href="<?php echo $admin_url;?>payment"><?php echo lang('common_payment_modules') ?></a></li>
					<li><a href="<?php echo $admin_url;?>settings/canned_messages"><?php echo lang('common_canned_messages') ?></a></li>
					<li><a href="<?php echo $admin_url;?>locations"><?php echo lang('common_locations') ?></a></li>
					<li><a href="<?php echo $admin_url;?>admin"><?php echo lang('common_administrators') ?></a></li>
					<li><a href="<?php echo $admin_url;?>settings"><?php echo lang('common_configuration') ?></a></li>
				</ul></li>
					<?php endif; ?>
				
			</ul>

	</div>
		


<?php endif;?>
<div class="container">
	<?php
	// lets have the flashdata overright "$message" if it exists
	if ($this->session->flashdata ( 'message' )) {
		$message = $this->session->flashdata ( 'message' );
	}
	
	if ($this->session->flashdata ( 'error' )) {
		$error = $this->session->flashdata ( 'error' );
	}
	
	if (function_exists ( 'validation_errors' ) && validation_errors () != '') {
		$error = validation_errors ();
	}
	?>
	
	<div id="js_error_container" class="alert alert-error"
			style="display: none;">
			<p id="js_error"></p>
		</div>

		<div id="js_note_container" class="alert alert-note"
			style="display: none;"></div>

	</div>

	<div class="container" id="content">

	<?php if(!empty($page_title)):?>
	<div class="page-header" id="content-header">
			<h1><?php echo  $page_title; ?></h1>
		</div>
	<?php endif;?>
	
	
	<?php if (!empty($message)): ?>
		<div class="alert alert-success">
			<a class="close" data-dismiss="alert">×</a>
			<?php echo $message; ?>
		</div>
	<?php endif; ?>

	<?php if (!empty($error)): ?>
		<div class="alert alert-error">
			<a class="close" data-dismiss="alert">×</a>
			<?php echo $error; ?>
		</div>
	<?php endif; ?>
	<div class="container-fluid">